import { GCellRenderer } from "../../../../../com/mui/controls/GCellRenderer";
import { ObjCreate } from "../../common/ObjCreate";
import { ImagesConst } from "../../../resource/ImagesConst";
import { BaseItem } from "../../common/BaseItem";
import { TLoadReward } from "../../../../../Message/Db/Tables/TLoadReward";
import { Language } from "../../../../../extend/language/Language";
import { ItemData } from "../../../resource/info/ItemData";
//class SeriesLoginRewardRenderer
    
    export  class SeriesLoginRewardRenderer extends GCellRenderer
    {
        constructor()
        {
            super();
            return;
        }

        protected /* override */ configUI(): void
        {
            super.configUI();
            this._dayTxt = ObjCreate.createTextField("连续登录1天", 20, 15, 80, 20, this);
            this._dayTxt.filters = [];
            var loc1=ObjCreate.createBitmap(ImagesConst.PackItemBg, 120, 5, this);
            var loc2=ObjCreate.createBitmap(ImagesConst.PackItemBg, 210, 5, this);
            this._notRechargeItem = new BaseItem();
            this._notRechargeItem.setSize(33, 33);
            this._notRechargeItem.x = 122;
            this._notRechargeItem.y = 7;
            addChild(this._notRechargeItem);
            this._rechargeItem = new BaseItem();
            this._rechargeItem.setSize(33, 33);
            this._rechargeItem.x = 212;
            this._rechargeItem.y = 7;
            addChild(this._rechargeItem);
            var loc3=ObjCreate.createBg(10, 48, 270, 2, this, ImagesConst.SplitLine);
            return;
        }

        public /* override */ set data(arg1: Object)
        {
            super.data = arg1;
            var loc1=arg1 as TLoadReward;
            this._dayTxt.htmlText = Language.getStringByParam(90077, loc1.day.toString());
            var loc2=loc1.rewardNotRecharge.split(",");
            var loc3=new ItemData(parseInt(loc2[0]));
            this._notRechargeItem.itemData = loc3;
            this._notRechargeItem.setAmountText(parseInt(loc2[1]));
            var loc4=loc1.rewardRecharge.split(",");
            var loc5=new ItemData(parseInt(loc4[0]));
            this._rechargeItem.itemData = loc5;
            this._rechargeItem.setAmountText(parseInt(loc4[1]));
            return;
        }

        /* internal */ /* var */_dayTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_notRechargeItem: BaseItem;

        /* internal */ /* var */_rechargeItem: BaseItem;
    }
